﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package org.aswing {
    import org.aswing.event.*;
    import org.aswing.util.*;

    public class AbstractListModel {

        private var listeners:Array;

        public function AbstractListModel(){
            this.listeners = new Array();
        }
        public function addListDataListener(_arg1:ListDataListener):void{
            this.listeners.push(_arg1);
        }
        public function removeListDataListener(_arg1:ListDataListener):void{
            ArrayUtils.removeFromArray(this.listeners, _arg1);
        }
        protected function fireContentsChanged(_arg1:Object, _arg2:int, _arg3:int, _arg4:Array):void{
            var _local7:ListDataListener;
            var _local5:ListDataEvent = new ListDataEvent(_arg1, _arg2, _arg3, _arg4);
            var _local6:int = (this.listeners.length - 1);
            while (_local6 >= 0) {
                _local7 = ListDataListener(this.listeners[_local6]);
                _local7.contentsChanged(_local5);
                _local6--;
            };
        }
        protected function fireIntervalAdded(_arg1:Object, _arg2:int, _arg3:int):void{
            var _local6:ListDataListener;
            var _local4:ListDataEvent = new ListDataEvent(_arg1, _arg2, _arg3, []);
            var _local5:int = (this.listeners.length - 1);
            while (_local5 >= 0) {
                _local6 = ListDataListener(this.listeners[_local5]);
                _local6.intervalAdded(_local4);
                _local5--;
            };
        }
        protected function fireIntervalRemoved(_arg1:Object, _arg2:int, _arg3:int, _arg4:Array):void{
            var _local7:ListDataListener;
            var _local5:ListDataEvent = new ListDataEvent(_arg1, _arg2, _arg3, _arg4);
            var _local6:int = (this.listeners.length - 1);
            while (_local6 >= 0) {
                _local7 = ListDataListener(this.listeners[_local6]);
                _local7.intervalRemoved(_local5);
                _local6--;
            };
        }

    }
}//package org.aswing 
